package com.bstek.consume.service;

import com.bstek.consume.bean.Depart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Derek.Zhang
 * @Title:
 * @Package
 * @Description:
 * @date 2020/2/27 22:30
 */
@Service
//指定服务提供者的名称
@FeignClient("derek-provider-depart")
@RequestMapping("/provider/depart")
public interface DepartService {



	@PostMapping("/save")
	boolean saveDepart(Depart depart);
	@DeleteMapping("/del/{id}")
	boolean removeDepartById(@PathVariable("id") int id);
	@PutMapping("/update")
	boolean modifyDepart(Depart depart);
	@GetMapping("/get/{id}")
	Depart getDepartById(@PathVariable("id") int id);
	@GetMapping("/list")
	List<Depart> listAllDeparts();

}
